package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SrRoomSeatMapper;
import com.ruoyi.system.domain.SrRoomSeat;
import com.ruoyi.system.service.ISrRoomSeatService;

/**
 * 自习室-座位关联Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-04-04
 */
@Service
public class SrRoomSeatServiceImpl implements ISrRoomSeatService 
{
    @Autowired
    private SrRoomSeatMapper srRoomSeatMapper;

    /**
     * 查询自习室-座位关联
     * 
     * @param id 自习室-座位关联主键
     * @return 自习室-座位关联
     */
    @Override
    public SrRoomSeat selectSrRoomSeatById(Long id)
    {
        return srRoomSeatMapper.selectSrRoomSeatById(id);
    }

    /**
     * 查询自习室-座位关联列表
     * 
     * @param srRoomSeat 自习室-座位关联
     * @return 自习室-座位关联
     */
    @Override
    public List<SrRoomSeat> selectSrRoomSeatList(SrRoomSeat srRoomSeat)
    {
        return srRoomSeatMapper.selectSrRoomSeatList(srRoomSeat);
    }

    /**
     * 新增自习室-座位关联
     * 
     * @param srRoomSeat 自习室-座位关联
     * @return 结果
     */
    @Override
    public int insertSrRoomSeat(SrRoomSeat srRoomSeat)
    {
        srRoomSeat.setCreateTime(DateUtils.getNowDate());
        return srRoomSeatMapper.insertSrRoomSeat(srRoomSeat);
    }

    /**
     * 修改自习室-座位关联
     * 
     * @param srRoomSeat 自习室-座位关联
     * @return 结果
     */
    @Override
    public int updateSrRoomSeat(SrRoomSeat srRoomSeat)
    {
        srRoomSeat.setUpdateTime(DateUtils.getNowDate());
        return srRoomSeatMapper.updateSrRoomSeat(srRoomSeat);
    }

    /**
     * 批量删除自习室-座位关联
     * 
     * @param ids 需要删除的自习室-座位关联主键
     * @return 结果
     */
    @Override
    public int deleteSrRoomSeatByIds(Long[] ids)
    {
        return srRoomSeatMapper.deleteSrRoomSeatByIds(ids);
    }

    /**
     * 删除自习室-座位关联信息
     * 
     * @param id 自习室-座位关联主键
     * @return 结果
     */
    @Override
    public int deleteSrRoomSeatById(Long id)
    {
        return srRoomSeatMapper.deleteSrRoomSeatById(id);
    }
}
